import {listComputer} from "@/api/cmdb/computer";

const computer = {
  state: {
    computers: [],
    computerTotal: '',
  },

  mutations: {
    SET_COMPUTER: (state, response) => {
      state.computers = response.rows
      state.computerTotal = response.total
    },
  },

  actions: {
    /** 查询computer列表列表 */
    GetComputerList({ commit ,state}) {
      listComputer().then(response => {
        commit('SET_COMPUTER',response)
      });
    },
  }
}

export default computer
